package com.order.hit.crossover.platform.common.bean;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Objects;

/**
 * @author Lei
 * @version 0.1
 * @date 2020/9/8
 */

@ToString
@Setter
@Getter
public class User {

    private int userId;

    // 使用用户名登陆，允许重复
    private String userName;

    //用户密码
    private String userPassword;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof User)) return false;
        User user = (User) o;
        return userId == user.userId &&
                Objects.equals(userName, user.userName) &&
                Objects.equals(userPassword, user.userPassword);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userId, userName, userPassword);
    }
}
